import request from '@/utils/request'
import formurlencoded from 'form-urlencoded'

// 搜索词历史记录
export function searchlogsListSearch(query) {
  return request({
    url: '/admin/searchlogs/list',
    method: 'get',
    params: query
  })
}
// 索引初始化
export function indexesSearch(query) {
  return request({
    url: '/admin/searchIndexes/operation',
    method: 'post',
    params: query
  })
}
// 获取关键词
export function keywordListSearch(query) {
  return request({
    url: '/admin/search/keyword',
    method: 'get',
    params: query
  })
}
// 关键词设置
export function updateKeywordSearch(query) {
  return request({
    url: '/admin/search/updateKeyword',
    method: 'post',
    params: query
  })
}
// 获取敏感词
export function keywordfilterListSearch(query) {
  return request({
    url: '/admin/search/keywordfilter',
    method: 'get',
    params: query
  })
}
// 敏感词过滤
export function keywordfilterSearch(query) {
  return request({
    url: '/admin/search/updateKeywordfilter',
    method: 'post',
    params: query
  })
}
// 获取模糊搜索词列表
export function recordListSearch(query) {
  return request({
    url: '/admin/searchrecord/list',
    method: 'get',
    params: query
  })
}
// 获取模糊搜索词列表-添加搜索词
export function addRecoreSearch(query) {
  return request({
    url: '/admin/searchrecord/create',
    method: 'post',
    params: query
  })
}
// 获取模糊搜索词列表-编辑搜索词
export function editRecoreSearch(query) {
  return request({
    url: '/admin/searchrecord/edit',
    method: 'get',
    params: query
  })
}
export function updateRecoreSearch(query) {
  return request({
    url: '/admin/searchrecord/update',
    method: 'post',
    params: query
  })
}
// 获取模糊搜索词列表-删除搜索词
export function deleteRecoreSearch(query) {
  return request({
    url: '/admin/searchrecord/del',
    method: 'post',
    params: query
  })
}
// 获取敏感词列表
export function getKeywordListSearch(query) {
  return request({
    url: '/admin/searchkeyword/list',
    method: 'get',
    params: query
  })
}
// 获取敏感词列表-添加搜索词
export function addKeywordSearch(query) {
  return request({
    url: '/admin/searchkeyword/create',
    method: 'post',
    params: query
  })
}
// 获取敏感词列表-编辑搜索词
export function editKeywordSearch(query) {
  return request({
    url: '/admin/searchkeyword/edit',
    method: 'get',
    params: query
  })
}
export function updateItemKeywordSearch(query) {
  return request({
    url: '/admin/searchkeyword/update',
    method: 'post',
    params: query
  })
}
// 获取敏感词列表-删除搜索词
export function deleteKeywordSearch(query) {
  return request({
    url: '/admin/searchkeyword/del',
    method: 'post',
    params: query
  })
}
